<template>
  <el-menu
    :default-active="activeIndex2"
    class="el-menu-vertical-demo"
    @open="handleOpen"
    @close="handleClose"
    background-color="#fff"
    text-color="block"
    :default-openeds="['2', '3', '4']"
    :router="true"
  >
   
    <el-submenu index="2">
      <template slot="title">
        <i class="el-icon-takeaway-box"></i>
        <span>用户管理</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="/adminUser">用户列表</el-menu-item>
      </el-menu-item-group>
    </el-submenu>
    <el-submenu index="3">
      <template slot="title">
        <i class="el-icon-notebook-2"></i>
        <span>新闻管理</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="/postNews">发布新闻</el-menu-item>
      </el-menu-item-group>
    </el-submenu>
    <el-submenu index="4">
      <template slot="title">
        <i class="el-icon-chat-dot-square"></i>
        <span>评论管理</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="/adminComments">评论列表</el-menu-item>
      </el-menu-item-group>
    </el-submenu>
  </el-menu>
</template>

<script>
// import AdminUser from '../adminView/AdminUser.vue'
export default {
  data() {
    return {
      activeIndex2: this.$route.path || "/",
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
  components: {
    // AdminUser
  },
};
</script>

<style scoped>
.el-menu-item {
  height: 70px;
  padding-top: 8px;
  font-size: 16px;
}

.el-submenu__title {
  /* height:700px; */
  padding-top: 8px;
  /* font-size: 16px; */
}

span {
  font-size: 16px;
}

.el-submenu .el-menu-item {
  height: 70px;
  padding-top: 8px;
  font-size: 16px;
}
.el-menu {
  margin-top: 10px;
}
</style>